<html>
<head><meta charset="utf-8"><title>rust analyzer logs · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html">rust analyzer logs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="189882363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189882363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> B YI <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189882363">(Mar 06 2020 at 11:17)</a>:</h4>
<p>How do I see the logs of rust-analyzer? I want rust-analyzer to write log to my specified file.</p>



<a name="189885692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189885692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189885692">(Mar 06 2020 at 12:06)</a>:</h4>
<p>Rust analyzer logs to stderr</p>



<a name="189886643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189886643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> B YI <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189886643">(Mar 06 2020 at 12:21)</a>:</h4>
<p>Thanks. The thing is rust-analyzer is started by the lsp client. I have to create a wrapper to view stderr of rust analyzer. Does rust-analyzer has some command line flag to specify the log file?</p>



<a name="189886787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189886787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189886787">(Mar 06 2020 at 12:23)</a>:</h4>
<p>Nope, logging destination is not configurable. It's the job of the client to redirect logs to the appropriate location</p>



<a name="189886806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189886806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189886806">(Mar 06 2020 at 12:23)</a>:</h4>
<p>Which client are you using?</p>



<a name="189886929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189886929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> B YI <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189886929">(Mar 06 2020 at 12:25)</a>:</h4>
<p>lsp-mode. It has a variable lsp-log-io to log all the requests. But viewing it within emacs is kind of awkward for me.</p>



<a name="189887069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189887069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189887069">(Mar 06 2020 at 12:27)</a>:</h4>
<p>Yeah, I think the best way would be to either use that Emacs log (I think it might be possible to save it to a file?) or to start rust-analyzer via <code>tee</code></p>



<a name="189887184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189887184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> B YI <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189887184">(Mar 06 2020 at 12:28)</a>:</h4>
<p>Ok. I will then create a wrapper. Thanks for your help.</p>



<a name="189902415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189902415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189902415">(Mar 06 2020 at 15:16)</a>:</h4>
<p>you could just save the stderr buffer to a file?</p>



<a name="189902443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust%20analyzer%20logs/near/189902443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust.20analyzer.20logs.html#189902443">(Mar 06 2020 at 15:16)</a>:</h4>
<p>oh, matklad proposed that already</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>